import { IsNotEmpty, IsString, Length } from 'class-validator';

export class SendSmsCodeDto {
    @IsNotEmpty({ message: '手机号不能为空' })
    @IsString()
    @Length(11, 11, { message: '手机号格式不正确' })
    phone: string;
}

export class VerifySmsCodeDto {
    @IsNotEmpty({ message: '手机号不能为空' })
    @IsString()
    @Length(11, 11, { message: '手机号格式不正确' })
    phone: string;

    @IsNotEmpty({ message: '验证码不能为空' })
    @IsString()
    @Length(6, 6, { message: '验证码格式不正确' })
    code: string;
} 